package cn.gudian.cms.Admin

import javax.servlet.http.HttpSession

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 2010-1-25
 * Time: 20:33:29
 * 用户对象session 操作类
 */
class AuthSession {
   public static final String ADMIN_SESSION_USER = "adminUser";

  //登录session
  public static boolean loginSession(HttpSession session, AdminU user) {
    //session.setMaxInactiveInterval(60);
    session.setAttribute(ADMIN_SESSION_USER, user);

  }
  //取得用户session
  public static AdminU getUser(HttpSession session) {

    return (AdminU) session.getAttribute(ADMIN_SESSION_USER);
  }
  //移除session
  public static void removeSession(HttpSession session) {
    session.removeAttribute(ADMIN_SESSION_USER);
  }
}
